home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / gnustep-base-runtime.postinst < prev    next >
Encoding:
Text File  |  2010-12-29  |  2.3 KB  |  87 lines

  1. #! /bin/sh
  2. # postinst script for gnustep-base
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  14. #          <failed-install-package> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see /usr/share/doc/packaging-manual/
  17. #
  18. # quoting from the policy:
  19. #     Any necessary prompting should almost always be confined to the
  20. #     post-installation script, and should be protected with a conditional
  21. #     so that unnecessary prompting doesn't happen if a package's
  22. #     installation fails and the `postinst' is called with `abort-upgrade',
  23. #     `abort-remove' or `abort-deconfigure'.
  24.  
  25. setup_config()
  26. {
  27.     f=/etc/GNUstep/gdomap_probes
  28.     if [ ! -f $f ]; then
  29.       if [ ! -d /etc/GNUstep ]; then mkdir /etc/GNUstep; fi
  30.       cat > $f <<EOF
  31. # Addresses to probe for GNUstep name service.
  32. # If this file does not contain any valid addresses, the local networks
  33. # are probed.
  34. EOF
  35.       for ip in `hostname -i`; do
  36.         echo $ip >> $f
  37.       done
  38.     fi
  39. }
  40.  
  41. case "$1" in
  42.     configure)
  43.     setup_config
  44.     # gdomap should not be setuid root.
  45.     # TODO: Remove after the squeeze release.
  46.     if dpkg-statoverride --list /usr/bin/gdomap >/dev/null; then
  47.         dpkg-statoverride --remove /usr/bin/gdomap
  48.     fi
  49.     if test -u /usr/bin/gdomap; then
  50.         chmod -s /usr/bin/gdomap
  51.     fi
  52.     # Left-over from the gnustep-make 1.x -> 2.x transition.
  53.     if dpkg-statoverride --list /usr/lib/GNUstep/System/Tools/gdomap \
  54.         >/dev/null; then
  55.         dpkg-statoverride --remove /usr/lib/GNUstep/System/Tools/gdomap
  56.     fi
  57.     ;;
  58.  
  59.     abort-upgrade|abort-remove|abort-deconfigure)
  60.  
  61.     ;;
  62.  
  63.     *)
  64.         echo "postinst called with unknown argument \`$1'" >&2
  65.         exit 0
  66.     ;;
  67. esac
  68.  
  69. # Automatically added by dh_installinit
  70. if [ -x "/etc/init.d/gdomap" ]; then
  71.     update-rc.d gdomap defaults >/dev/null
  72.     if [ -n "$2" ]; then
  73.         _dh_action=restart
  74.     else
  75.         _dh_action=start
  76.     fi
  77.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  78.         invoke-rc.d gdomap $_dh_action || exit $?
  79.     else
  80.         /etc/init.d/gdomap $_dh_action || exit $?
  81.     fi
  82. fi
  83. # End automatically added section
  84.  
  85.  
  86. exit 0
  87.